{include file="common/_header"}

<body>

<div class="x-body layui-anim layui-anim-up">
    <form class="layui-form layui-form-pane">

        <input type="hidden" name="product_id" value="{$data.product_id}" />

        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">审核不通过的意见</label>
            <div class="layui-input-block">
                <textarea placeholder="请输入内容" name="reasons" class="layui-textarea"></textarea>
            </div>
        </div>

        <div style="margin-top: 50px; float: right; margin-right: 50px;">
<!--            <input type="submit" class="layui-btn">-->
            <button type="button" lay-submit lay-filter="add" class="layui-btn">立即提交</button>
        </div>
    </form>
</div>
</body>


<script>
    layui.use(['layedit', 'form'], function () {

        var form = layui.form;
        form.on('submit(add)', function (data) {

            $.ajax({
                'url': 'failproduct',
                'type': 'post',
                'data': data.field,
                'dataType': 'json',
                success: function (data) {
                    if (data.code == 1) {
                        layer.msg(data.msg, {
                            icon: 6,
                            time: 800,
                        }, function () {
                            window.parent.location.href = data.url;
                        })
                    } else if (data.code == 0) {
                        layer.msg(data.msg);
                    }
                }
            });
        });

    });


</script>

{include file="common/_bottom"}